package fragmentson;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.TextView;

import com.wq.cycling.R;

import fragmentson.backhandle.BackHandledFragment;
import util.dialog.DialogFromMiddle;

/**
 * 账户余额
 * author：wangqi on 2017/4/26 17:48
 * email：773630555@qq.com
 */
public class RemainingSum extends BackHandledFragment {

	private View rootView;
	private EditText et_imei;
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		rootView = getLayoutInflater(savedInstanceState).inflate(R.layout.fragment_remainingsum, null);
		initView();
		return rootView;
	}

	private void initView() {
		// TODO Auto-generated method stub
		((TextView) rootView.findViewById(R.id.tv_title)).setText(R.string.add_device_title1);
		rootView.findViewById(R.id.tv_next).setOnClickListener(listener);
		et_imei = ((EditText) rootView.findViewById(R.id.et_imei));
	}

	public static RemainingSum newInstance() {
		RemainingSum fragment = new RemainingSum();
		return fragment;
	}

	private View.OnClickListener listener = new View.OnClickListener() {
		@Override
		public void onClick(View v) {
			switch (v.getId()){
				case R.id.tv_next:
					DialogFromMiddle dialogFormMiddle = new DialogFromMiddle(getActivity());
					dialogFormMiddle.setSureListener(new DialogFromMiddle.Sure() {
						@Override
						public void onSure() {
							// TODO Auto-generated method stub
						}
					});
					dialogFormMiddle.show(getResources().getString(R.string.dialog_title3), getResources().getString(R.string.dialog_content3), "", "", getResources().getString(R.string.dialog_yes3),getResources().getString(R.string.dialog_no3), true);
					break;
				default:
					break;
			}
		}
	};

	@Override
	public boolean onBackPressed() {
		return false;
	}
	
}
